NHibernate mapping many to many three tables [closed]
Posted
by
Tony
on Programmers
See other posts from Programmers
or by Tony
Published on 2012-11-27T00:47:45Z
Indexed on
2012/11/27
5:28 UTC
Read the original article
Hit count: 199
nhibernate
I am trying to get this solved but can't so far. all kind of errors.
These are my db tables
Person (personID, name, age)
Role (roleID, roleName)
PersonRoles(personRolesID, personID, roleID)
this is my domain class
public Person
{
public virtual Roles RolesForThisPerson {get;set;}
public virtual string Name {get;set;}
public virtual int Age {get;set;}
}
public Roles
{
public virtual IList<string> RoleList {get;set;}
}
I am totally lost on how to approach this. I am so confused about sets, bags, lists... i don't even know where to start.
Anybody can give me a little push here?
thanks
© Programmers or respective owner